import { View } from "react-native";
import LanguageSettings from "@/components/Settings/Language";
import React, { useLayoutEffect } from "react";
import { Stack, useNavigation } from "expo-router";
import { getHeaderStyle } from "@/styles/header.style";
import { useTheme } from "@/contexts/ThemeContext";
export default function LanguageSettingsPage() {
  // 获取当前主题模式
  const { themeMode } = useTheme();

  // 获取基于当前主题的header样式
  const headerStyles = getHeaderStyle(themeMode);

  return (
    <>
      <Stack.Screen
        options={{
          title: "语言设置",
          headerTitleAlign: headerStyles.headerTitleAlign as "left" | "center",
          headerStyle: headerStyles.headerStyle,
          headerTintColor: headerStyles.headerTintColor,
          headerTitleStyle: headerStyles.headerTitleStyle,
        }}
      />
      <View style={{ flex: 1 }}>
        <LanguageSettings />
      </View>
    </>
  );
}
